package com.bsoft.gol.hcs.enumcase;

/**
 * @author tongtp
 * @version v0.1
 * @package enumcase
 * @className RuleConditionTypeEnum
 * @description 规则条件类型枚举类
 * @create 2021-08-06 16:32
 **/
public enum RuleConditionTypeEnum {
	//规则条件类型：1 记录时间 2 门诊病历 3 实验室报告 4 影像学报告 5 病理学报告 6 临床检查 7 手术名称 8 非手术治疗 9 入院记录 10 护理医嘱 11 出院小结 20 门诊诊断 21 入院诊断 22 出院诊断
	RECORD_TIME((byte) 1, "记录时间"),
	OUTPATIENT_MEDICAL_RECORD((byte) 2, "门诊病历"),
	LABORATORY_REPORT((byte) 3, "实验室报告"),
	IMAGE_REPORT((byte) 4, "影像学报告"),
	PATHOLOGY_REPORT((byte) 5, "病理学报告"),
	CLINICAL_EXAMINATION((byte) 6, "临床检查"),
	OPERATIVE_NAME((byte) 7, "手术名称"),
	NONOPERATIVE_TREATMENT((byte) 8, "非手术治疗"),
	ADMISSION_RECORD((byte) 9, "入院记录"),
	NURSING_ADVICE((byte) 10, "护理医嘱"),
	DISCHARGE_SUMMARY((byte) 11, "出院小结"),
	OUTPATIENT_DIAGNOSIS((byte)20,"门诊诊断"),
	IN_HOSPITAL_DIAGNOSIS((byte)21,"入院诊断"),
	OUT_HOSPITAL_DIAGNOSIS((byte)22,"出院诊断"),
	SIGN_INFO((byte)12,"体征信息");

	private final Byte type;

	private final String name;

	RuleConditionTypeEnum(Byte type, String name) {
		this.type = type;
		this.name = name;
	}

	public static RuleConditionTypeEnum getEnumByKey(Byte type) {
		for (RuleConditionTypeEnum temp : RuleConditionTypeEnum.values()) {
			if (temp.getType().equals(type)) {
				return temp;
			}
		}
		return null;
	}
	public static String getNameByKey(Byte type) {
		for (RuleConditionTypeEnum temp : RuleConditionTypeEnum.values()) {
			if (temp.getType().equals(type)) {
				return temp.getName();
			}
		}
		return null;
	}
	public Byte getType() {
		return type;
	}

	public String getName() {
		return name;
	}
}
